<%@ page import="java.util.ArrayList" %>
<%@ page import="top.shiyiri.pojo.Student" %><%--
  Created by IntelliJ IDEA.
  User: 14533
  Date: 2022/1/29
  Time: 18:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style type="text/css">
        table{
            border: 1px black solid;
            width: 600px;
            border-collapse: collapse;
        }
        td, th{
            border: 1px black solid;
            text-align: center;
        }
    </style>
</head>
<body>
    <%--练习二：jsp输出一个表格，里面有十个学生信息--%>
    <%
        ArrayList<Student> list = (ArrayList)request.getAttribute("list");
    %>

    <table>
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>电话</th>
            <th>操作</th>
        </tr>
        <%for (Student student: list) {%>
        <tr>
            <td><%=student.getId()%></td>
            <td><%=student.getName()%></td>
            <td><%=student.getAge()%></td>
            <td><%=student.getPhone()%></td>
            <td>删除、修改</td>
        </tr>
        <%}%>
    </table>
</body>
</html>
